//
//  MCShowDigatalInfoVc.swift
//  MCBodyBuildingPro
//
//  Created by Renlvshijie on 2023/6/18.
//

import UIKit
import AVFoundation


class MCShowDigatalInfoVc: MCBaseVc {

    @IBOutlet weak var numInfoLabel: UILabel!
    
    private var showDigalInfoPlayer:AVPlayer?
    
    override func viewDidLoad() {
        super.viewDidLoad()
        self.view.backgroundColor = UIColor.qmui_color(withHexString: "#FFFFFF")?.withAlphaComponent(0.8)
        
        let item = AVPlayerItem.init(url: URL(string: "https://sfhmaster-1313464417.cos.ap-nanjing.myqcloud.com/2023/06/18/1670305877122375680.mp3")!)
        
        showDigalInfoPlayer = AVPlayer.init(playerItem: item)
        
        showDigalInfoPlayer?.play()
        
        WLButtonCountdownManager.default().scheduledCountDown(withKey: "mcbodyBuilding", timeInterval: 3) { second in
            
            self.numInfoLabel.text = "\(Int(second))"
            
            if second == 1 {
                
                self.dismiss(animated: false)
            }
            
        }
        
    }

    
    
    
    
    
    

}
